package com.fowo.api.syncLingxingApi.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fowo.api.entity.Product;
import com.fowo.api.syncLingxingApi.entity.TmpSyncLingxingToProductInfo;
import com.fowo.api.syncLingxingApi.mapper.TmpSyncLingxingToProductInfoMapper;
import com.fowo.api.syncLingxingApi.service.TmpSyncLingxingToProductInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
@DS("ds24")
public class TmpSyncLingxingToProductInfoServiceImpl
        extends ServiceImpl<TmpSyncLingxingToProductInfoMapper, TmpSyncLingxingToProductInfo>
        implements TmpSyncLingxingToProductInfoService {
    @Override
    public Integer updateToProducts(String version) {
        return baseMapper.updateToProducts(version);
    }

    @Override
    public void deleteAll() {
        baseMapper.deleteAll();
    }
    public List<Product> getBySku(List<TmpSyncLingxingToProductInfo> skus) {

        return baseMapper.getProductBySku(skus);
    }

    @Override
    public List<String> getAllSku(long offset, long length) {
        return baseMapper.getAllSku(offset, length);
    }

    @Override
    public void updateProductInfo(String version) {
        this.baseMapper.updateProductInfo(version);
    }

    @Override
    public void updateCustomsPrice(String version) {
        this.baseMapper.updateCustomsPrice(version);
    }

    @Override
    public void insertCustomsPrice(String version) {
        this.baseMapper.insertCustomsPrice(version);
    }

}
